if exists(select name from sysobjects where name = 'sp_SanPhamGetInfo')
	drop proc sp_SanPhamGetInfo
go
/*-- =============================================
	Created by: HP
	Created on: 2014-03-15 (dd/mm/yyyy)
	Description: 
	--

	File:$sql-scripts/Proc.sp_SanPhamGetInfo.sql
*/-- =============================================

CREATE PROCEDURE sp_SanPhamGetInfo
			
	@Id      		INT
AS
BEGIN	
	SELECT
		a.[Id],
		a.[TenSanPham],
		a.[MoTa],
		a.[NoiDung],
		a.[GiaBan],
		a.[GiaKM],
		a.[ThuTu],
		a.[Image],
		a.[Image1],
		a.[Image2],
		a.[Image3],
		a.[Image4],
		a.[Keywords],
		a.[Description],
		a.[Title],
		a.[NguoiTao],
		a.[NgayTao],
		a.[NguoiSua],
		a.[NgaySua],
		a.[TrangThai],
		a.[LoaiSanPhamId]
	FROM
		SanPham a
	WHERE
		    a.[Id]       = @Id and TrangThai<>255
END
GO
